page:  «  1   2   3   4   5   6    

Clock Control System

Wait, wait, wait! Sure, I know how to build a big digit - but how the heck did you control that much current with such few ICs and such few control lines? Ahh, I'm glad you asked. Here are some fun pointers about how to control large numbers of 7 segments LEDs.

Now if you're not a hardware person, get ready for some technical jargon.

A PIC 16F877A has quite a few I/O pins (around 32). But if you start doing the math, you see just how limited we are.

  • 6 digits * 7 segments = 42 channels

Sure, we could find a microcontroller that has 42 available I/O pins, but there's got to be a better way! This is actually an age-old problem. Turns out there are chips out there! The 74HC4511 is the magical chip that takes a Binary-Coded-Decimal (BCD) input and outputs the correct pins to create that binary number on a 7-segment display.

Okay, so we go from 7 lines down to 4, big deal? There is a latch on the 74HC4511. This latch allows us to share the 4-bit bus with all the channels, and then just toggle the latch pin on the digit we need to talk to. Maybe a schematic will help:

 

Here is the PIC 16F877A connections

You can see 4 Control lines. This is the BCD bus. There is also 6 Driver lines. These Driver lines activate the latch on each 'channel'.

This is the circuitry for one channel

U6 is the 74HC4511. U7 is a ULN2003A. JP1 is the RJ45 jack. Just stick with me a bit longer!

The ULN2003A is a high-current Darlington array. Darling what? This IC has 7 channels. Each channel can control up to 500mA. When 1B goes high, current is allowed from the '1C' input to ground.

So when the Num1_f pin goes high, current flows from RAW, through the LED light bars in the big digit, into 1C, and then out through GND. This may seem a little bit odd at first. Maybe this will help:

 

Over-simplified ULN single-channel. When 1B goes high, current is allowed to pass from 1C to GND.

This is the circuitry for one channel

Ok - so now for the chain of events.

  1. The PIC parses out the GPS time from NMEA sentences coming out of the Lassen iQ receiver at 4800bps.

  2. The PIC decides that the time is 6:45:33. So a '3' needs to be displayed on channel 1.

  3. A binary three (0b.0011) is put onto the bus

  4. Driver1 is pulled low, then driven high. Because all other driver lines are kept high, the other drivers ignore this bus data.

  5. The 74HC4511 for channel 1 sees this binary number, notices that it's been latched, and then outputs the correct segments to light up a three - segments A, B, C, D, and G go high.

  6. The ULN2003A detects these lines (Num1_a, b, c, d and g) go high and allows current to sink through 3C, 4C, 5C, 6C, and 2C.

  7. The LED light bars inside the digit (located farthest to the right) light up the correct bars to display a three.

It's really pretty slick. The system is completely scalable. To add another 7-segment display requires only 1 additional I/O pin for another DriverX line. The PIC 16F877A could control as many as 28 digits. Have you ever seen 28 digits next to each other? How about 18" wide and on a wall? That's really huge.

Here are the 6-channels

Here they are on the PCB. You can see a 74HC4511 next to a ULN2003A, next to an RJ45 jack for each channel.

That's it! Sorry the tutorial ended up being so long. This project took about two weeks of cutting and figuring out how to best create the digits. The firmware took about an hour and hardware layout took about three (we've used most of the basic components before). Let us know what you think.

-NES

March 19th, 2006


Back to Tutorials

 

Comments

8 comments


Log in to post comments.

GeeksHaveFeelings's rank:
+2.5
|   December 26, 2008 at 6:51 PM
Comment rating:
0
I think you could have avoided all the EPS dust and got a cleaner edge if you had used a hot wire foam cutter instead of a saw to cut it.
WirelessMonk's rank:
+2
|   December 27, 2008 at 5:50 AM
Comment rating:
0
Any chance you might make the controller available for purchase, at least an unpopulated PCB?
unitedlightingdesign's rank:
+1
|   December 30, 2008 at 12:21 AM
Comment rating:
0
I would be very interested in talking to you about a purchasing a similar controller. I hope that you check back here often. If you do, please post a reply and lets talk. mikem@uesomaha.com
FozzyVis's rank:
+1.4
|   January  1, 2009 at 2:27 PM
Comment rating:
0
Any chance we could get bigger pics and schematics on this last page?
I would be interested to see a schematic of some sorts, even a simplified one would be nice...

thanx!
by
waqas's rank:
+1
|   January 22, 2009 at 1:31 AM
Comment rating:
0
nice work

can you pls put up the schematic of the board on the site???
by
Rubi's rank:
+8.9
|   April  5, 2009 at 2:13 AM
Comment rating:
0
I am not sure if I can compete with this display, but mine are also not the smallest.
http://www.youtube.com/watch?v=rkOoHor347s
by
JoeHat's rank:
+1.3
|   August  7, 2009 at 8:20 AM
Comment rating:
0
How about doing this with EL tape or EL wire segments? It would be cool if the clock blended into the wall so that if you turned it off it would be impossible to see, but using a dimmer switch, on off switch you change the brightness and it suddenly pops out!
Lonewolf's rank:
+1.3
|   January 19, 2010 at 1:07 PM
Comment rating:
0
Looking at the datasheet it would seem you could add intensity/brightness control by feeding a PWM signal into the Blanking Input of the 74HC4511. If you wanted to go crazy and add a 2nd (DriverX) line for each digit so each one has it's own PWM signal you could do a fade effect on digit change...

Feedback

What's on your mind?

Please include your email address if you'd like us to respond to a specific question.

submit


If you would like to tell us more, you can fill out our form if you need some psycho-suggestive questions. Go to the form.